package edu.westga.sketchit2009cs.gameEngine;

/**
 * Simply takes in two strings and compares
 * them to each other to see if the guessed
 * string is the same as the secret word
 * string.
 * 
 * @author RJ Hill
 *
 */
public class WordGame {
	
	
	/**
	 * WordGame initializer
	 */
	public WordGame() {
		
	}
	
	/**
	 * checkAnswer takes 2 words and compares them to each other
	 * to see if the guess is right.
	 * <p>
	 * Requires: theGuess != null && theWord != null
	 * <p>
	 * Ensures: won == true || won == false
	 * @param theGuess 	word which a user guessed
	 * @param theWord  	the word to compare the guess to
	 * @return
	 */
	public boolean checkAnswer(String theGuess, String theWord) {
		boolean won;
		
		if(theGuess.equalsIgnoreCase(theWord)) {
			won = true;
		}
		else {
			won = false;
		}
		
		return won;
	}	
}
